.class public final Lcn/cheln/support/images/FileCategoryHelper;
.super Ljava/lang/Object;


# static fields
.field private static a:Ljava/lang/String;

.field private static b:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 5

    const/4 v4, 0x2

    const/4 v3, 0x1

    const/4 v2, 0x0

    const-string v0, "apk"

    sput-object v0, Lcn/cheln/support/images/FileCategoryHelper;->a:Ljava/lang/String;

    const-string v0, "lwt"

    sput-object v0, Lcn/cheln/support/images/FileCategoryHelper;->b:Ljava/lang/String;

    new-array v0, v4, [Ljava/lang/String;

    const-string v1, "zip"

    aput-object v1, v0, v2

    const-string v1, "rar"

    aput-object v1, v0, v3

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    const/16 v0, 0x8

    new-array v0, v0, [Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    sget-object v1, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Music:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    aput-object v1, v0, v2

    sget-object v1, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Video:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    aput-object v1, v0, v3

    sget-object v1, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Picture:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    aput-object v1, v0, v4

    const/4 v1, 0x3

    sget-object v2, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Theme:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    aput-object v2, v0, v1

    const/4 v1, 0x4

    sget-object v2, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Doc:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    aput-object v2, v0, v1

    const/4 v1, 0x5

    sget-object v2, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Zip:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    aput-object v2, v0, v1

    const/4 v1, 0x6

    sget-object v2, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Apk:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    aput-object v2, v0, v1

    const/4 v1, 0x7

    sget-object v2, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->NoType:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    aput-object v2, v0, v1

    return-void
.end method

.method public static a(Ljava/lang/String;)Lcn/cheln/support/images/f;
    .locals 4

    const/4 v3, 0x0

    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v0, Lcn/cheln/support/images/f;

    sget-object v1, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Folder:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    sget-object v2, Lcn/cheln/explorer/beans/FileInfo;->iconDir:Landroid/graphics/Bitmap;

    invoke-direct {v0, v1, v2, v3}, Lcn/cheln/support/images/f;-><init>(Lcn/cheln/support/images/FileCategoryHelper$FileCategory;Landroid/graphics/Bitmap;[Ljava/lang/String;)V

    :goto_0
    return-object v0

    :cond_0
    if-nez p0, :cond_1

    const/4 v0, -0x1

    :goto_1
    if-ltz v0, :cond_3

    add-int/lit8 v0, v0, 0x1

    invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    sget-object v1, Lcn/cheln/support/images/FileCategoryHelper;->a:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    new-instance v0, Lcn/cheln/support/images/f;

    sget-object v1, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Apk:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    sget-object v2, Lcn/cheln/explorer/beans/FileInfo;->iconPackage:Landroid/graphics/Bitmap;

    invoke-direct {v0, v1, v2, v3}, Lcn/cheln/support/images/f;-><init>(Lcn/cheln/support/images/FileCategoryHelper$FileCategory;Landroid/graphics/Bitmap;[Ljava/lang/String;)V

    goto :goto_0

    :cond_1
    const/16 v0, 0x2e

    invoke-virtual {p0, v0}, Ljava/lang/String;->lastIndexOf(I)I

    move-result v0

    goto :goto_1

    :cond_2
    sget-object v1, Lcn/cheln/support/images/FileCategoryHelper;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    new-instance v0, Lcn/cheln/support/images/f;

    sget-object v1, Lcn/cheln/support/images/FileCategoryHelper$FileCategory;->Theme:Lcn/cheln/support/images/FileCategoryHelper$FileCategory;

    sget-object v2, Lcn/cheln/explorer/beans/FileInfo;->iconTheme:Landroid/graphics/Bitmap;

    invoke-direct {v0, v1, v2, v3}, Lcn/cheln/support/images/f;-><init>(Lcn/cheln/support/images/FileCategoryHelper$FileCategory;Landroid/graphics/Bitmap;[Ljava/lang/String;)V

    goto :goto_0

    :cond_3
    sget-object v0, Lcn/cheln/support/images/f;->a:[Lcn/cheln/support/images/f;

    invoke-static {p0, v0}, Lcn/cheln/support/app/a;->a(Ljava/lang/String;[Lcn/cheln/support/images/f;)Lcn/cheln/support/images/f;

    move-result-object v0

    goto :goto_0
.end method
